var memberUtil=require('../../../utils/memberUtil');
var app = getApp();
var kdonekey="ExOltDfL9254" ;
var kdonecustomer="94EB2410AF4F4DEE4899BA1BF2FC47F2";
var kuaidi={
    "quansu": "全速物流",
    "ajexpress": "捷记方舟",
    "shlindao": "林道国际",
    "chinaicip": "卓志速运",
    "ccd": "河南次晨达",
    "nanjingshengbang": "晟邦",
    "safexpress": "Safexpress",
    "kuayue": "跨越",
    "zhonghuan": "中环",
    "beijingfengyue": "北京丰越供应链",
    "airgtc": "航空快递",
    "guotongkuaidi": "国通",
    "jiuyescm": "九曳供应链",
    "cangspeed": "仓鼠快递",
    "dtdcindia": "DTDC India",
    "shenghuiwuliu": "盛辉",
    "letseml": "美联",
    "qzx56": "全之鑫物流",
    "vietnam": "越南小包(Vietnam Posts)",
    "yousutongda": "优速通达",
    "wandougongzhu": "豌豆物流",
    "jiguang": "极光",
    "gls": "GLS",
    "aruba": "阿鲁巴[荷兰]（Post Aruba）",
    "jrypex": "吉日优派",
    "newzealand": "新西兰（New Zealand Post）",
    "zhongtongphone": "中通（带电话）",
    "benteng": "奔腾物流",
    "aae": "AAE-中国件",
    "gml": "英脉",
    "fedexukcn": "FedEx-英国件",
    "zhongtianwanyun": "中天万运",
    "nuoyaao": "偌亚奥国际",
    "pinsuxinda": "品速心达",
    "cex": "城铁速递",
    "seur": "International Seur",
    "dpduk": "DPD UK",
    "emsukrainecn": "乌克兰EMS-中文(EMS Ukraine)",
    "guoeryue": "天天快物流",
    "xinbangwuliu": "新邦",
    "vancl": "凡客配送（作废）",
    "bluedart": "BlueDart",
    "emms": "澳州顺风快递",
    "wanboex": "万博",
    "abf": "ABF",
    "hnfy": "飞鹰",
    "yishunhang": "亿顺航",
    "jialidatong": "嘉里大通",
    "chronopostport": "Chronopost Portugal",
    "nuoer": "诺尔国际物流",
    "bcwelt": "BCWELT",
    "tntau": "TNT Australia",
    "yiouzhou": "易欧洲国际物流",
    "yinjiesudi": "银捷",
    "skynetmalaysia": "SkyNet Malaysia",
    "minshengkuaidi": "闽盛",
    "republic": "叙利亚(Syrian Post)",
    "dindon": "叮咚澳洲转运",
    "haiwaihuanqiu": "海外环球",
    "bahrain": "巴林(Bahrain Post)",
    "jinguangsudikuaijian": "京广",
    "japanpost": "日本郵便",
    "yiqisong": "一起送",
    "yxexpress": "亿翔",
    "zhimakaimen": "芝麻开门",
    "airpak": "airpak expresss",
    "ytky168": "运通快运",
    "ydglobe": "云达通",
    "rrskx": "日日顺快线",
    "canpost": "加拿大-(Canada Post)-英文版",
    "gdxp": "新鹏",
    "quanritongkuaidi": "全日通",
    "adp": "ADP国际",
    "quanxintong": "全信通",
    "arkexpress": "方舟",
    "hengluwuliu": "恒路",
    "citylink": "City-Link",
    "chile": "智利(Correos Chile)",
    "shunjiefengda": "顺捷丰达",
    "ecmsglobal": "ECMS Express",
    "xaetc": "西安胜峰",
    "xiyoutekuaidi": "希优特",
    "ems": "EMS",
    "peixingwuliu": "陪行",
    "cypruspost": "塞浦路斯(Cyprus Post)",
    "yitongfeihong": "一统飞鸿",
    "wuyuansudi": "伍圆",
    "pfcexpress": "皇家",
    "belize": "伯利兹(Belize Postal)",
    "jgwl": "景光",
    "xtb": "鑫通宝",
    "htwd": "华通务达",
    "wondersyd": "中邮速递",
    "yongbangwuliu": "永邦国际物流",
    "xiangteng": "翔腾物流",
    "xingyuankuaidi": "新元快递",
    "brunei": "文莱(Brunei Postal)",
    "vps": "维普恩物流",
    "uluckex": "优联吉运",
    "diantongkuaidi": "店通",
    "gsm": "GSM",
    "xdexpress": "迅达速递",
    "shenganwuliu": "圣安",
    "southafrican": "南非（South African Post Office）",
    "youzhengbk": "邮政标快",
    "albania": "阿尔巴尼亚(Posta shqipatre)",
    "nedahm": "红马",
    "sucmj": "特急便",
    "stoexpress": "美国申通",
    "hengrui56": "恒瑞物流",
    "gts": "GTS",
    "wuliuky": "五六快运",
    "hkposten": "香港(HongKong Post)英文",
    "indonesia": "印度尼西亚EMS(Pos Indonesia-EMS)",
    "jdexpressusa": "骏达快递",
    "haidaibao": "海带宝",
    "dhlnetherlands": "DHL-荷兰（DHL Netherlands）",
    "ahkbps": "卡邦配送",
    "leopard": "云豹国际货运",
    "correos": "哥斯达黎加(Correos de Costa Rica)",
    "bsht": "百事亨通",
    "sfjhd": "圣飞捷快递",
    "scxingcheng": "四川星程",
    "tnt": "TNT",
    "tny": "泰中物流",
    "nell": "尼尔快递",
    "jieanda": "捷安达",
    "dpdgermany": "DPD Germany",
    "ruidaex": "瑞达国际速递",
    "edragon": "龙象国际物流",
    "luxembourg": "卢森堡(Luxembourg Post)",
    "eupackage": "易优包裹",
    "peex": "派尔",
    "westwing": "西翼物流",
    "wanjiawuliu": "万家",
    "auexpress": "澳邮中国",
    "nzzto": "新西兰中通",
    "zhongtong": "中通",
    "estes": "Estes",
    "jinchengwuliu": "锦程",
    "xinfengwuliu": "信丰",
    "ilogen": "logen路坚",
    "dechuangwuliu": "深圳德创",
    "chuangyi": "创一",
    "coe": "COE",
    "pochta": "俄罗斯邮政",
    "jinan": "金岸物流",
    "qdants": "ANTS EXPRESS",
    "qexpress": "易达通快递",
    "huada": "华达",
    "topspeedex": "中运全速",
    "tiantian": "天天",
    "singpost": "新加坡小包(Singapore Post)",
    "anxindakuaixi": "安信达",
    "ytkd": "运通中港(作废)",
    "malaysiapost": "马来西亚小包（Malaysia Post(Registered)）",
    "hermes": "Hermes",
    "chuanxiwuliu": "传喜",
    "yuefengwuliu": "越丰",
    "uzbekistan": "乌兹别克斯坦(Post of Uzbekistan)",
    "quanchuan56": "全川物流",
    "yongchangwuliu": "永昌",
    "saudipost": "沙特阿拉伯(Saudi Post)",
    "flyway": "程光快递",
    "mingliangwuliu": "明亮",
    "kuaijiesudi": "快捷",
    "shipgce": "飞洋",
    "gswtkd": "万通快递",
    "shanghaikuaitong": "上海快通",
    "xiaocex": "小C海淘",
    "chunfai": "香港骏辉物流",
    "gtongsudi": "广通",
    "myhermes": "MyHermes",
    "ltexp": "乐天",
    "jixianda": "急先达",
    "lianbangkuaidi": "联邦",
    "hipito": "海派通",
    "milkyway": "银河物流",
    "portugalctt": "葡萄牙（Portugal CTT）",
    "adaexpress": "明大",
    "haimengsudi": "海盟",
    "hebeijianhua": "河北建华",
    "bosind": "堡昕德速递",
    "jindawuliu": "金大",
    "longbanwuliu": "龙邦",
    "anjiekuaidi": "青岛安捷",
    "kuaidawuliu": "快达",
    "egypt": "埃及（Egypt Post）",
    "meiquick": "美快国际物流",
    "jjx888": "佳捷翔物流",
    "gatikwe": "Gati-KWE",
    "ewe": "EWE全球",
    "tnten": "TNT全球件",
    "tcixps": "TCI XPS",
    "rpx": "rpx",
    "sdsy888": "首达速运",
    "minghangkuaidi": "民航",
    "quanchenkuaidi": "全晨",
    "directlink": "Direct Link",
    "ztong": "智通",
    "szdpex": "深圳DPEX",
    "bohei": "波黑(JP BH Posta)",
    "youshuwuliu": "优速",
    "hutongwuliu": "户通",
    "belpost": "白俄罗斯(Belpochta)",
    "yyqc56": "一运全成物流",
    "yunda": "韵达",
    "bpostinter": "比利时国际(Bpost international)",
    "jym56": "加运美速递",
    "globaltracktrace": "globaltracktrace",
    "dhlpoland": "DHL-波兰（DHL Poland）",
    "wykjt": "51跨境通",
    "canpostfr": "加拿大(Canada Post)-法文版",
    "birdex": "笨鸟海淘",
    "ycgky": "远成快运",
    "mangguo": "芒果",
    "debangwuliu": "德邦",
    "jmjss": "金马甲",
    "sunjex": "新杰物流",
    "rrs": "日日顺",
    "yuntongkuaidi": "运通中港",
    "ykouan": "洋口岸",
    "shunjieda": "顺捷达",
    "peisihuoyunkuaidi": "配思货运",
    "njcustoms": "南京海关",
    "yundx": "运东西",
    "longlangkuaidi": "隆浪",
    "pengyuanexpress": "鹏远国际速递",
    "nalexpress": "新亚物流",
    "quanyikuaidi": "全一",
    "zhaijisong": "宅急送",
    "kaolaexpress": "考拉国际速递",
    "qianli": "千里速递",
    "youjia": "友家速递",
    "hungary": "匈牙利（Magyar Posta）",
    "youzhengguonei": "邮政包裹/平邮",
    "bqcwl": "百千诚",
    "tongdaxing": "通达兴",
    "asendiausa": "Asendia USA",
    "hongpinwuliu": "宏品",
    "buytong": "百通物流",
    "xsrd": "鑫世锐达",
    "vanuatu": "瓦努阿图(Vanuatu Post)",
    "cuckooexpess": "布谷鸟速递",
    "nle": "NLE",
    "aramex": "Aramex",
    "xintianjie": "信天捷",
    "speeda": "行必达",
    "feibaokuaidi": "飞豹",
    "wjkwl": "万家康物流",
    "epanex": "泛捷国际",
    "xingchengjibian": "星晨急便",
    "czwlyn": "云南中诚",
    "hlyex": "好运来",
    "blueskyexpress": "蓝天快递",
    "thailand": "泰国（Thailand Thai Post）",
    "kxda": "凯信达",
    "novaposhta": "Nova Poshta",
    "ibenben": "途鲜物流",
    "dhlen": "DHL全球件",
    "a2u": "A2U",
    "landmarkglobal": "Landmark Global",
    "superb": "Superb Grace",
    "chszhonghuanguoji": "CHS中环国际快递",
    "haypost": "亚美尼亚(Haypost-Armenian Postal)",
    "iparcel": "UPS i-parcle",
    "cpsair": "华中快递",
    "huiqiangkuaidi": "汇强",
    "meixi": "美西快递",
    "sevendays": "七天连锁",
    "namibia": "纳米比亚(NamPost)",
    "pengcheng": "鹏程快递",
    "auspost": "澳大利亚邮政-英文",
    "suer": "速尔",
    "subida": "速必达",
    "bulgarian": "保加利亚（Bulgarian Posts）",
    "aus": "澳世",
    "postennorge": "挪威（Posten Norge）",
    "oman": "阿曼(Oman Post)",
    "krtao": "淘韩国际快递",
    "nntengda": "腾达",
    "ahdf": "德方物流",
    "sdyoupei": "优配",
    "multipack": "Mexico Multipack",
    "peru": "秘鲁(SERPOST)",
    "yufeng": "御风",
    "lianbangkuaidien": "联邦-英文",
    "ontrac": "OnTrac",
    "cllexpress": "澳通华人物流",
    "donghanwl": "东瀚",
    "deutschepost": "德国(Deutsche Post)",
    "jixiangyouau": "吉祥邮（澳洲）",
    "wtdchina": "威时沛运货运",
    "malaysiaems": "马来西亚大包、EMS（Malaysia Post(parcel,EMS)）",
    "wtdex": "WTD海外通",
    "vipexpress": "鹰运国际速递",
    "gzcustoms": "广州海关",
    "fastway": "Fastway Ireland",
    "zsmhwl": "明辉物流",
    "eltahell": "ELTA Hellenic Post",
    "youbijia": "邮必佳",
    "pingandatengfei": "平安达腾飞",
    "wanxiangwuliu": "万象",
    "bolivia": "玻利维亚",
    "neweggozzo": "新蛋奥硕",
    "yingchao": "英超物流",
    "yue777": "玥玛速运",
    "fenghuangkuaidi": "凤凰",
    "chinatzx": "同舟行",
    "hfwuxi": "和丰同城",
    "italysad": "Italy SDA",
    "nebuex": "星云速递",
    "omniva": "爱沙尼亚(Eesti Post)",
    "menduimen": "门对门",
    "gscq365": "哥士传奇速递",
    "httx56": "汇通天下物流",
    "wenjiesudi": "文捷航空",
    "di5pll": "递五方云仓",
    "wzhaunyun": "微转运",
    "postnl": "荷兰挂号信(PostNL international registered mail)",
    "interlink": "Interlink Express",
    "qichen": "启辰国际",
    "italiane": "意大利(Poste Italiane)",
    "ethiopia": "埃塞俄比亚(Ethiopian postal)",
    "xinhongyukuaidi": "鑫飞鸿",
    "aolau": "AOL澳通",
    "syjiahuier": "佳惠尔",
    "fbkd": "飞邦",
    "estafeta": "Estafeta",
    "nsf": "新顺丰（NSF）",
    "adodoxm": "澳多多国际速递",
    "speedpost": "新加坡EMS、大包(Singapore Speedpost)",
    "speedoex": "申必达",
    "shunshid": "顺士达速运",
    "zqlwl": "青旅物流",
    "sendtochina": "速递中国",
    "ksudi": "快速递",
    "yuantong": "圆通",
    "tntitaly": "TNT Italy",
    "fardarww": "颿达国际",
    "yuananda": "源安达",
    "dhlde": "DHL-德国",
    "belgiumpost": "比利时(Belgium Post)",
    "shangcheng": "尚橙",
    "youyou": "优优速递",
    "alog": "心怡物流",
    "mexico": "墨西哥（Correos de Mexico）",
    "samoa": "萨摩亚(Samoa Post)",
    "emsen": "EMS-英文",
    "lineone": "一号线",
    "advancing": "安达信",
    "uganda": "乌干达(Posta Uganda)",
    "euasia": "欧亚专线",
    "lundao": "论道国际物流",
    "yihangmall": "易航物流",
    "yuanweifeng": "源伟丰",
    "correosdees": "西班牙(Correos de Espa?a)",
    "xiaohongmao": "北青小红帽",
    "pakistan": "巴基斯坦(Pakistan Post)",
    "jiajiatong56": "佳家通货运",
    "huaqikuaiyun": "华企",
    "ypsd": "壹品速递",
    "jordan": "约旦(Jordan Post)",
    "huanqiu": "环球",
    "ubonex": "优邦速运",
    "correoargentino": "阿根廷(Correo Argentina)",
    "england": "英国(大包,EMS)",
    "ucs": "合众(UCS）",
    "lasy56": "林安物流",
    "yujiawuliu": "煜嘉",
    "emsguoji": "EMS-国际件",
    "suteng": "广东速腾",
    "shengfengwuliu": "盛丰",
    "cnausu": "中澳速递",
    "yunfeng56": "韵丰物流",
    "sinoairinex": "中外运空运",
    "dekuncn": "德坤供应链",
    "hjs": "猴急送",
    "sinoex": "中外运-中文",
    "iexpress": "iExpress",
    "hkpost": "香港邮政(HongKong Post)",
    "handboy": "汉邦国际速递",
    "sundarexpress": "顺达",
    "csxss": "新时速物流",
    "upsmailinno": "UPS Mail Innovations",
    "datianwuliu": "大田",
    "jiajiwuliu": "佳吉",
    "auex": "澳货通",
    "superoz": "速配欧翼",
    "csuivi": "法国(La Poste)",
    "anxl": "安迅",
    "cnmcpl": "马珂博逻",
    "postnlpacle": "荷兰包裹(PostNL International Parcels)",
    "colissimo": "法国小包（colissimo）",
    "dcs": "DCS",
    "latvia": "拉脱维亚(Latvijas Pasts)",
    "mailongdy": "迈隆递运",
    "donghong": "东红",
    "parcelforce": "英国大包、EMS（Parcel Force）",
    "ueq": "UEQ",
    "fsexp": "全速快递",
    "yodel": "YODEL",
    "malta": "马耳他（Malta Post）",
    "iceland": "冰岛(Iceland Post)",
    "uex": "UEX国际物流",
    "ltx": "蓝天国际快递",
    "haihongwangsong": "海红网送",
    "feikangda": "飞康达",
    "pjbest": "品骏",
    "timedg": "万家通快递",
    "barbados": "巴巴多斯(Barbados Post)",
    "guangdongtonglu": "广东通路",
    "happylink": "开心快递",
    "hangyu": "航宇",
    "emirates": "阿联酋(Emirates Post)",
    "lbbk": "立白宝凯",
    "shiningexpress": "阳光快递",
    "trakpak": "TRAKPAK",
    "redexpress": "Red Express",
    "flysman": "飞力士",
    "selektvracht": "Selektvracht",
    "yitongda": "易通达",
    "mauritius": "毛里求斯(Mauritius Post)",
    "kazpost": "哈萨克斯坦(Kazpost)",
    "gaticn": "Gati-中文",
    "valueway": "美通",
    "jietekuaidi": "捷特",
    "shlexp": "SHL畅灵国际",
    "postnlchina": "荷兰邮政-中国件",
    "gdrz58": "容智物流速运",
    "littlebearbear": "小熊物流",
    "lishi": "丽狮物流",
    "ukraine": "乌克兰小包、大包(UkrPoshta)",
    "zhongyouwuliu": "中邮",
    "deltec": "Deltec Courier",
    "ganzhongnengda": "能达",
    "jiacheng": "佳成快递",
    "zhuoshikuaiyun": "卓实快运",
    "yilingsuyun": "亿领",
    "slovak": "斯洛伐克(Slovenská Posta)",
    "cambodia": "柬埔寨(Cambodia Post)",
    "weitepai": "微特派",
    "phlpost": "菲律宾（Philippine Postal）",
    "nmhuahe": "华赫",
    "greenland": "格陵兰[丹麦]（TELE Greenland A/S）",
    "kangliwuliu": "康力",
    "tianzong": "天纵",
    "eshunda": "俄顺达",
    "dfpost": "达方",
    "idada": "大达",
    "goldhaitao": "金海淘",
    "paraguay": "巴拉圭(Correo Paraguayo)",
    "mexicodenda": "Mexico Senda Express",
    "koreapostcn": "韩国邮政",
    "swisspost": "瑞士(Swiss Post)",
    "caledonia": "新喀里多尼亚[法国](New Caledonia)",
    "qbexpress": "秦邦",
    "lmfex": "良藤国际速递",
    "nanjing": "南京100",
    "rytsd": "日益通",
    "azerbaijan": "阿塞拜疆EMS(EMS AzerExpressPost)",
    "cnup": "CNUP 中联邮",
    "dhl": "DHL",
    "dehaoyi": "德豪驿",
    "rwanda": "卢旺达(Rwanda i-posita)",
    "adlerlogi": "德国雄鹰速递",
    "banma": "斑马物流",
    "sunspeedy": "新速航",
    "anjie88": "安捷物流",
    "yibangwuliu": "一邦",
    "yuanchengwuliu": "远成",
    "zyzoom": "增速海淘",
    "benniao": "笨鸟国际",
    "htongexpress": "华通",
    "gslhkd": "联合快递",
    "xinning": "新宁物流",
    "lutong": "鲁通快运",
    "edlogistics": "益递物流",
    "yinsu": "音素",
    "hre": "高铁",
    "xilaikd": "西安喜来",
    "royalmail": "英国小包（Royal Mail）",
    "zhongruisudi": "中睿",
    "fedexcn": "Fedex-国际件-中文",
    "cloudexpress": "CE易欧通国际速递",
    "clsp": "CL日中速运",
    "cnws": "中国翼",
    "didasuyun": "递达",
    "sdto": "速达通",
    "yuanzhijiecheng": "元智捷诚",
    "jiayunmeiwuliu": "加运美",
    "vnpost": "越南EMS(VNPost Express)",
    "india": "印度(India Post)",
    "shangda": "上大",
    "mailikuaidi": "麦力",
    "fox": "FOX GLOBAL EXPRESS",
    "sofast56": "嗖一下同城快递",
    "surpassgo": "天越物流",
    "zenzen": "三三国际物流",
    "bangsongwuliu": "邦送",
    "saiaodimmb": "赛澳递for买卖宝",
    "hanrun": "韩润",
    "chengda": "成达国际",
    "hrbzykd": "卓烨快递",
    "hhair56": "华瀚快递",
    "sd138": "泰国138国际",
    "yunexpress": "德国云快递",
    "yuxinwuliu": "宇鑫",
    "gatien": "Gati-英文",
    "yafengsudi": "亚风",
    "bht": "BHT",
    "lasership": "LaserShip",
    "suning": "苏宁快递",
    "lantiankuaidi": "蓝天",
    "hd": "宏递快运",
    "huiwen": "汇文",
    "lanbiaokuaidi": "蓝镖",
    "hkems": "云邮跨境快递",
    "staky": "首通快运",
    "hqtd": "环球通达",
    "lsexpress": "6LS EXPRESS",
    "zytdscm": "中宇天地",
    "mchy": "木春货运",
    "usps": "USPS",
    "xiaoxiangchenbao": "潇湘晨报",
    "dhlbenelux": "DHL Benelux",
    "chengji": "城际",
    "minbangsudi": "民邦",
    "ocs": "OCS",
    "afghan": "阿富汗(Afghan Post)",
    "hongxun": "鸿讯物流",
    "auod": "澳德物流",
    "jiayiwuliu": "佳怡",
    "xianfeng": "先锋快递",
    "royalmailcn": "英国邮政小包",
    "huangmajia": "黄马甲",
    "synship": "SYNSHIP快递",
    "gibraltar": "直布罗陀[英国]( Royal Gibraltar Post)",
    "yyox": "邮客全球速递",
    "newsway": "家家通快递",
    "exfresh": "安鲜达",
    "libanpost": "黎巴嫩(Liban Post)",
    "ups": "UPS",
    "jd": "京东",
    "sfift": "十方通",
    "zengyisudi": "增益",
    "tntpostcn": "TNT Post",
    "huitongkuaidi": "汇通",
    "upsen": "UPS全球件",
    "jdpplus": "急递",
    "lithuania": "立陶宛（Lietuvos pa?tas）",
    "mjexp": "美龙快递",
    "amusorder": "amazon-国际订单",
    "annengwuliu": "安能",
    "ftd": "富腾达国际",
    "dpd": "DPD",
    "cnair": "CNAIR",
    "koreapostkr": "韩国邮政韩文",
    "gaotieex": "鑫和高铁快运",
    "finland": "芬兰(Itella Posti Oy)",
    "lanhukuaidi": "蓝弧",
    "lqht": "恒通快递",
    "cargolux": "卢森堡航空",
    "ftlexpress": "法翔速运",
    "ywexpress": "远为快递",
    "fiji": "斐济(Fiji Post)",
    "fanyukuaidi": "凡宇",
    "bjcustoms": "北京海关",
    "ukrpost": "乌克兰小包、大包(UkrPost)",
    "tunisia": "突尼斯EMS(Rapid-Poste)",
    "kingfreight": "货运皇",
    "hyk": "上海昊宏国际货物",
    "portugalseur": "Portugal Seur",
    "haihongmmb": "海红for买卖宝",
    "cnpex": "CNPEX中邮",
    "sucheng": "速呈宅配",
    "brazilposten": "巴西(Brazil Post/Correios)",
    "hzcustoms": "杭州海关",
    "quantwl": "全通",
    "qinyuan": "秦远",
    "haoshengwuliu": "昊盛",
    "tianma": "天马迅达",
    "shandiantu": "闪电兔",
    "yemen": "也门(Yemen Post)",
    "yjxlm": "宜家行",
    "cosco": "中远e环球",
    "hangrui": "上海航瑞货运",
    "hnssd56": "顺时达物流",
    "higo": "黑狗物流",
    "bpost": "比利时（Bpost）",
    "postserv": "台湾（中华邮政）",
    "macroexpressco": "ME物流",
    "meiguokuaidi": "美国",
    "santaisudi": "三态",
    "tanzania": "坦桑尼亚(Tanzania Posts)",
    "skypost": "荷兰Sky Post",
    "turtle": "海龟国际快递",
    "feikuaida": "飞快达",
    "chengguangkuaidi": "程光",
    "el56": "易联通达",
    "kuachangwuliu": "跨畅（直邮易）",
    "esinotrans": "中外运电子商务",
    "yongwangda": "永旺达快递",
    "sagawa": "佐川急便",
    "tonghetianxia": "通和天下",
    "koalaexp": "考拉速递",
    "baishiwuliu": "百世",
    "zgyzt": "一站通快递",
    "hyytes": "恒宇运通",
    "jinyuekuaidi": "晋越",
    "tlky": "天联快运",
    "xipost": "西邮寄",
    "tollpriority": "Toll Priority(Toll Online)",
    "quanfengkuaidi": "全峰",
    "emsukraine": "乌克兰EMS(EMS Ukraine)",
    "lntjs": "沈阳特急送",
    "fastgo": "速派(FastGo)",
    "zhuanyunsifang": "转运四方",
    "mapleexpress": "今枫国际快运",
    "japanposten": "日本（Japan Post）",
    "pzhjst": "急顺通",
    "montenegro": "黑山(Po?ta Crne Gore)",
    "fedroad": "联邦转运",
    "feihukuaidi": "飞狐",
    "yangbaoguo": "洋包裹",
    "sujievip": "郑州速捷",
    "mxe56": "淼信快递",
    "pcaexpress": "PCA Express",
    "bdatong": "八达通",
    "runhengfeng": "全时速运",
    "spring56": "春风物流",
    "postenab": "PostNord(Posten AB)",
    "shiyunkuaidi": "世运",
    "dpex": "DPEX",
    "ztky": "中铁快运",
    "yamato": "黑猫雅玛多",
    "chinasqk": "SQK国际速递",
    "quanjitong": "全际通",
    "doortodoor": "CJ",
    "guangdongyouzhengwuliu": "广东邮政",
    "kcs": "KCS",
    "chronopostfren": "法国大包、EMS-英文(Chronopost France)",
    "hnqst": "河南全速通",
    "hrvatska": "克罗地亚（Hrvatska Posta）",
    "euexpress": "EU-EXPRESS",
    "s2c": "S2C",
    "sihaiet": "四海快递",
    "suijiawuliu": "穗佳",
    "ocaargen": "OCA Argentina",
    "junfengguoji": "骏丰国际",
    "fandaguoji": "颿达国际-英文",
    "kuaitao": "快淘",
    "austria": "奥地利(Austrian Post)",
    "kerrytj": "嘉里大荣物流",
    "ledii": "乐递供应链",
    "fedexuk": "FedEx-英国件（FedEx UK)",
    "zhongxinda": "忠信达",
    "xianchengliansudi": "西安城联",
    "kenya": "肯尼亚(POSTA KENYA)",
    "huilian": "辉联",
    "lianhaowuliu": "联昊通",
    "fedexus": "FedEx-美国",
    "chukou1": "出口易",
    "riyuwuliu": "日昱",
    "gzxingcheng": "贵州星程",
    "supinexpress": "速品快递",
    "huaxialongwuliu": "华夏龙",
    "postnlcn": "荷兰挂号信(PostNL international registered mail)",
    "yiqiguojiwuliu": "一柒国际",
    "rufengda": "如风达",
    "jsexpress": "骏绅物流",
    "dingdong": "叮咚",
    "opek": "OPEK",
    "city100": "城市100",
    "zsky123": "准实快运",
    "kyrgyzpost": "吉尔吉斯斯坦(Kyrgyz Post)",
    "shentong": "申通",
    "sutongwuliu": "速通",
    "postdanmarken": "丹麦(Post Denmark)",
    "anlexpress": "新干线",
    "skynet": "skynet",
    "ruexp": "捷网俄全通",
    "yidatong": "易达通",
    "zhongtiewuliu": "中铁物流",
    "dianyi": "云南滇驿",
    "siodemka": "Siodemka",
    "serbia": "塞尔维亚(PE Post of Serbia)",
    "szuem": "联运通物流",
    "romanian": "罗马尼亚（Posta Romanian）",
    "bgky100": "邦工快运",
    "zhdwl": "众辉达",
    "ldxpres": "林道国际-英文",
    "zhengzhoujianhua": "郑州建华",
    "upsfreight": "UPS Freight",
    "tykd": "天翼",
    "otobv": "中欧快运",
    "sinatone": "信联通",
    "quansutong": "全速通",
    "baifudongfang": "百福东方",
    "yundaexus": "美国韵达",
    "jiuyicn": "久易",
    "nlebv": "亚欧专线",
    "maldives": "马尔代夫(Maldives Post)",
    "hzpl": "华航",
    "kuaiyouda": "四川快优达",
    "changyuwuliu": "长宇",
    "lesotho": "莱索托(Lesotho Post)",
    "gdkd": "港快",
    "gjwl": "冠捷物流",
    "zhongjiwuliu": "中技",
    "crazyexpress": "疯狂快递",
    "lijisong": "立即送",
    "bjemstckj": "北京EMS",
    "biaojikuaidi": "彪记",
    "macedonia": "马其顿(Macedonian Post)",
    "cncexp": "C&C全球（澳洲cncexp)",
    "postelbe": "PostElbe",
    "zhongtongguoji": "中通国际",
    "ezhuanyuan": "易转运",
    "hitaoe": "Hi淘易快递",
    "shunfeng": "顺丰",
    "emonitoring": "波兰小包(Poczta Polska)",
    "zhongwaiyun": "中外运",
    "xdshipping": "国晶物流",
    "emsinten": "EMS-国际件-英文结果",
    "ukrpostcn": "乌克兰邮政包裹",
    "bangladesh": "孟加拉国(EMS)",
    "zhongsukuaidi": "中速",
    "yuanfeihangwuliu": "原飞航",
    "anposten": "爱尔兰(An Post)",
    "swisspostcn": "瑞士邮政",
    "iyoungspeed": "驿扬国际速运",
    "dsukuaidi": "D速",
    "hrex": "锦程快递",
    "moldova": "摩尔多瓦(Posta Moldovei)",
    "ceskaposta": "捷克（?eská po?ta）",
    "zhichengtongda": "至诚通达",
    "youzhengguoji": "国际包裹",
    "haoyoukuai": "好又快物流",
    "xianglongyuntong": "祥龙运通",
    "cqxingcheng": "重庆星程",
    "gda": "冠达",
    "ruidianyouzheng": "瑞典（Sweden Post）",
    "djy56": "天翔东捷运",
    "huandonglg": "环东物流",
    "cbo56": "钏博物流",
    "ilyang": "ILYANG",
    "fedex": "FedEx-国际",
    "yamaxunwuliu": "亚马逊中国",
    "nigerianpost": "尼日利亚(Nigerian Postal)",
    "hongjie": "宏捷国际物流",
    "ndwl": "南方传媒",
    "changjiang": "长江国际",
    "aosu": "澳速",
    "ecuador": "厄瓜多尔(Correos del Ecuador)",
    "israelpost": "以色列(Israel Post)",
    "xlobo": "贝海国际",
    "cameroon": "喀麦隆(CAMPOST)",
    "dabei": "德意思",
    "decnlh": "德中快递",
    "stkd": "顺通快递",
    "chronopostfra": "法国大包、EMS-法文（Chronopost France）",
    "shanghaiwujiangmmb": "上海无疆for买卖宝",
    "disifang": "递四方",
    "dpdpoland": "DPD Poland",
    "sxhongmajia": "红马甲",
    "scic": "中加国际",
    "wotu": "渥途国际速运",
    "huanqiuabc": "香港环球快运",
    "tiandihuayu": "天地华宇",
    "mrw": "MRW",
    "shunbang": "顺邦国际",
    "zteexpress": "ZTE中兴物流",
    "farlogistis": "泛远国际物流",
    "gongsuda": "共速达",
    "xynyc": "新元国际",
    "onehcang": "一号仓",
    "balunzhi": "巴伦支",
    "byht": "博源恒通",
    "macao": "澳门(Macau Post)",
    "feiyuanvipshop": "飞远配送",
    "baitengwuliu": "百腾",
    "guanting": "冠庭国际物流",
    "abcglobal": "全球",
    "gotoubi": "UBI Australia",
    "ariesfar": "艾瑞斯远",
    "fengxingtianxia": "风行天下",
    "jcex": "jcex",
    "ghl": "环创物流",
    "sccod": "丰程物流",
    "zhaijibian": "宅急便",
    "rfsd": "瑞丰",
    "dasu": "达速物流",
    "lejiedi": "乐捷递",
    "dayangwuliu": "大洋",
    "bphchina": "速方",
    "ecfirstclass": "EC-Firstclass",
    "vangenexpress": "万庚国际速递",
    "tntuk": "TNT UK",
    "ecmscn": "易客满",
    "huoban": "兰州伙伴",
    "polarisexpress": "北极星快运",
    "ckeex": "城晓国际",
    "dpexen": "Toll",
    "nederlandpost": "荷兰速递(Nederland Post)",
    "koreapost": "韩国（Korea Post）",
    "emsluqu": "高考通知书",
    "qskdyxgs": "千顺快递",
    "dongjun": "成都东骏",
    "purolator": "Purolator",
    "yizhengdasuyun": "一正达",
    "lianyun": "联运",
    "efs": "EFS Post",
    "quantium": "Quantium",
    "yiex": "宜送",
    "shunfengen": "顺丰-美国件",
    "bjxsrd": "鑫锐达"
};
Page({

  /**
   * 页面的初始数据
   */
  data: {
      ordermessagehudong:[
          {flag:true,icon:"/images/icon/2_0.png",name:"order",text:"我的订单"},
          {flag:false,icon:"/images/icon/2_1.png",name:"message",text:"通知"},
          {flag:false,icon:"/images/icon/2_2.png",name:"hudong",text:"互动"}
      ],
      orderList:[
          {text:"待发货",icon:"/images/icon/news_01.png",grenicon:"/images/icon/news_02.png",showFlag:false,active:false,name:"dfhorder",currentType:1},
          {text:"待收货",icon:"/images/icon/news_03.png",grenicon:"/images/icon/news_04.png",showFlag:true,active:true,name:"dshorder",currentType:2},
          {text:"待评价",icon:"/images/icon/news_05.png",grenicon:"/images/icon/news_08.png",showFlag:false,active:false,name:"dpjorder",currentType:3},
          {text:"售后",icon:"/images/icon/news_06.png",grenicon:"/images/icon/news_07.png",showFlag:false,active:false,name:"tkshorder",currentType:4}
      ],
    curNav:0,
    contentList:0,
    imagesUrl: app.globalData.baseImageUrl,
      readMessageCount:0,
      messageShop:true,
      currentType: 2,
    orderContentList:[],
      messageFlag:true,
      hudongFlag:true,
      orderFlag:false,
      orderType:"dshorder"
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
      var that=this;
      var resss=(wx.getStorageSync("loginUserInfo").userInfo==undefined?"":wx.getStorageSync("loginUserInfo").userInfo);
      that.setData({
          userInfo:resss
      })
      if(that.data.userInfo.id==undefined) {
          memberUtil.getLogin(app,0,1,that,2);
      }
  },
//通知提示
    kajuan:function(){
        wx.showToast({
            title: '此模块工程师正在积极升级，敬请期待！',
            icon: 'none',
            duration: 2000
        })
    },
    //顶部三个菜单切换
    tabQieHuan:function(e){
      var that=this;
      var dataId=e.currentTarget.dataset.id;
      var showList=this.data.ordermessagehudong;
        var orderType="";
      for(var i in showList){
          if(showList[i].name==dataId){
              showList[i]["flag"]=true;
              orderType=showList[i]["name"];
          }else{
              showList[i]["flag"]=false;
          }
      }
        if(orderType=="order"){
            that.setData({
                ordermessagehudong:showList
            })
            that.orderAlert(orderType);
        }else{
            that.kajuan();
            return false;
        }

    },
    //订单状态切换
    orderqiehuan:function(e){
      var that=this;
      var dataId=e.currentTarget.dataset.id;
      var orderList=this.data.orderList;
      var currentType=0;
      var orderType="";
      for(var i in orderList){
          if(orderList[i].name==dataId){
              orderList[i].active=true;
              orderList[i].showFlag=true;
              currentType=orderList[i].currentType;
              orderType=orderList[i].name;
          }else{
              orderList[i].active=false;
              orderList[i].showFlag=false;
          }
      }
        if(orderType=="dfhorder" || orderType=="dshorder"){
            that.setData({
                orderList:orderList,
                currentType:currentType,
                orderType:orderType
            })
            that.onShow();
        }else{
            that.kajuan();
          return false;
        }

    },
    /**
     * 我的订单弹框处理
     */
    orderAlert: function (options) {
        var that=this;
        var messageFlag=true;
        var hudongFlag=true;
        var orderFlag=false;
        if(options=="order") {
            messageFlag=true;
            hudongFlag=true;
            orderFlag=false;
        }else if(options=="message") {
            messageFlag=false;
            hudongFlag=true;
            orderFlag=true;
        }else if(options=="hudong") {
            messageFlag=true;
            hudongFlag=false;
            orderFlag=true;
        }
        that.setData({
            messageFlag:messageFlag,
            hudongFlag:hudongFlag,
            orderFlag:orderFlag
        })
    },
    //获取订单列表
    findOrderList:function(){
        // 获取订单列表
        wx.showLoading({
            title: '数据加载中',
            mask: true
        });

        var that = this;
        var json = {
            memberId: that.data.userInfo.id,
            status: that.data.currentType
        };
        var url="/order/findOrderList";
        if(that.data.orderType=="dshorder"){
            url="/order/waitReceivedOrder";
        }
        wx.request({
            url: app.globalData.baseUrl + url,
            data: JSON.stringify(json),
            method:'POST',
            success: function(res){

                if (Number(res.data.length)>0) {
                    that.setData({
                        orderContentList: res.data
                    });
                }else{
                    that.setData({
                        orderContentList: []
                    });
                }
                wx.hideLoading();
            }
        })
    },
    //查询快递
    kuaidiselect:function(e){
        var that=this;
        var kuaidiNo=e.currentTarget.dataset.logisticscode;
        var orderId=e.currentTarget.dataset.id;
        var orderInfo="";
        var orderInfoList=that.data.orderContentList;
        for(var a in orderInfoList){
            if(orderInfoList[a].id==orderId){
                orderInfo=orderInfoList[a];
                break;
            }
        }
        var logisticsName="";
        var logisticsNameCode="";

        if(kuaidiNo!="" || kuaidiNo!=null){
            wx.showLoading({
                title: '数据加载中',
                mask: true
            });
            wx.request({
                url: 'https://www.kuaidi100.com/autonumber/auto?num='+kuaidiNo+"&key="+kdonekey,
                data: {},
                method:'POST',
                success: function(res){
                    var kds=res.data;
                    logisticsNameCode=kds[0].comCode;
                    logisticsName=kuaidi[logisticsNameCode];
                    var kuaidiInfo={
                        goodsPicUrl:orderInfo.goodsPicUrl,
                        goodsName:orderInfo.goodsName,
                        logisticsCode:orderInfo.logisticsCode,
                        logisticsNameCode:logisticsNameCode,
                        logisticsName:logisticsName,
                        createTime:orderInfo.createTime.substring(0,16)
                    }
                    wx.setStorageSync("kuaidiInfo", kuaidiInfo);
                    wx.hideLoading();
                    wx.navigateTo({
                        url: "/pages/message/logistics?kuaidiInfo=kuaidiInfo"
                    })
                },
                fail:function (res) {
                    wx.showToast({
                        title: '物流信息获取失败，请稍后再试！',
                        icon: 'none',
                        duration: 2000
                    })
                    return false;
                }
            })
        }else{
            wx.showToast({
                title: '物流信息获取失败，请稍后再试！',
                icon: 'none',
                duration: 2000
            })
            return false;
        }
    },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
  
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
  var that=this;
  that.findOrderList();
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
  
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
  
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
  
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
      var that=this;
      return {
          title: '我的二维码',
          path: "/pages/shop/shareSuccess?parentId=" + that.data.userInfo.id + "&enterType=0",
          imageUrl: app.globalData.loginUserInfo.erweimaUrl
      }
  }
})